<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: cv::dnn_superres::DnnSuperResImpl Class Reference</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="navpath" id="nav-path">
  <ul>
<li class="navelem"><a class="el" href="../../d2/d75/namespacecv.html">cv</a></li><li class="navelem"><a class="el" href="../../de/d9a/namespacecv_1_1dnn__superres.html">dnn_superres</a></li><li class="navelem"><a class="el" href="../../d8/d11/classcv_1_1dnn__superres_1_1DnnSuperResImpl.html">DnnSuperResImpl</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-static-methods">Static Public Member Functions</a> |
<a href="../../d1/dc2/classcv_1_1dnn__superres_1_1DnnSuperResImpl-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">cv::dnn_superres::DnnSuperResImpl Class Reference<div class="ingroups"><a class="el" href="../../d9/de0/group__dnn__superres.html">DNN used for super resolution</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<p>A class to upscale images via convolutional neural networks. The following four models are implemented:  
 <a href="../../d8/d11/classcv_1_1dnn__superres_1_1DnnSuperResImpl.html#details">More...</a></p>
<p><code>#include &lt;opencv2/dnn_superres.hpp&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a5a9a8d189caa273fc210441f0858a8a3"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d11/classcv_1_1dnn__superres_1_1DnnSuperResImpl.html#a5a9a8d189caa273fc210441f0858a8a3">DnnSuperResImpl</a> ()</td></tr>
<tr class="memdesc:a5a9a8d189caa273fc210441f0858a8a3"><td class="mdescLeft"> </td><td class="mdescRight">Empty constructor.  <a href="#a5a9a8d189caa273fc210441f0858a8a3">More...</a><br/></td></tr>
<tr class="separator:a5a9a8d189caa273fc210441f0858a8a3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4f6e7d88778f73bcfdf43c0d9bff2c1a"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d11/classcv_1_1dnn__superres_1_1DnnSuperResImpl.html#a4f6e7d88778f73bcfdf43c0d9bff2c1a">DnnSuperResImpl</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;algo, int scale)</td></tr>
<tr class="memdesc:a4f6e7d88778f73bcfdf43c0d9bff2c1a"><td class="mdescLeft"> </td><td class="mdescRight">Constructor which immediately sets the desired model.  <a href="#a4f6e7d88778f73bcfdf43c0d9bff2c1a">More...</a><br/></td></tr>
<tr class="separator:a4f6e7d88778f73bcfdf43c0d9bff2c1a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af345f7283533961302b854ccc5266f57"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d11/classcv_1_1dnn__superres_1_1DnnSuperResImpl.html#af345f7283533961302b854ccc5266f57">getAlgorithm</a> ()</td></tr>
<tr class="memdesc:af345f7283533961302b854ccc5266f57"><td class="mdescLeft"> </td><td class="mdescRight">Returns the scale factor of the model:  <a href="#af345f7283533961302b854ccc5266f57">More...</a><br/></td></tr>
<tr class="separator:af345f7283533961302b854ccc5266f57"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a03ddb65b1a6ae8b0064b91ffe7785eeb"><td align="right" class="memItemLeft" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d11/classcv_1_1dnn__superres_1_1DnnSuperResImpl.html#a03ddb65b1a6ae8b0064b91ffe7785eeb">getScale</a> ()</td></tr>
<tr class="memdesc:a03ddb65b1a6ae8b0064b91ffe7785eeb"><td class="mdescLeft"> </td><td class="mdescRight">Returns the scale factor of the model:  <a href="#a03ddb65b1a6ae8b0064b91ffe7785eeb">More...</a><br/></td></tr>
<tr class="separator:a03ddb65b1a6ae8b0064b91ffe7785eeb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af56741a70ee1346efcc69789f99200d8"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d11/classcv_1_1dnn__superres_1_1DnnSuperResImpl.html#af56741a70ee1346efcc69789f99200d8">readModel</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;path)</td></tr>
<tr class="memdesc:af56741a70ee1346efcc69789f99200d8"><td class="mdescLeft"> </td><td class="mdescRight">Read the model from the given path.  <a href="#af56741a70ee1346efcc69789f99200d8">More...</a><br/></td></tr>
<tr class="separator:af56741a70ee1346efcc69789f99200d8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1d062da8e770781eb7323a44a25b6fa3"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d11/classcv_1_1dnn__superres_1_1DnnSuperResImpl.html#a1d062da8e770781eb7323a44a25b6fa3">readModel</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;weights, const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;definition)</td></tr>
<tr class="memdesc:a1d062da8e770781eb7323a44a25b6fa3"><td class="mdescLeft"> </td><td class="mdescRight">Read the model from the given path.  <a href="#a1d062da8e770781eb7323a44a25b6fa3">More...</a><br/></td></tr>
<tr class="separator:a1d062da8e770781eb7323a44a25b6fa3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab4d5e45240e7dbc436f077d34bff8854"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d11/classcv_1_1dnn__superres_1_1DnnSuperResImpl.html#ab4d5e45240e7dbc436f077d34bff8854">setModel</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;algo, int scale)</td></tr>
<tr class="memdesc:ab4d5e45240e7dbc436f077d34bff8854"><td class="mdescLeft"> </td><td class="mdescRight">Set desired model.  <a href="#ab4d5e45240e7dbc436f077d34bff8854">More...</a><br/></td></tr>
<tr class="separator:ab4d5e45240e7dbc436f077d34bff8854"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a11b32bf3c6d7e162d0d8e8f5bb1544cc"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d11/classcv_1_1dnn__superres_1_1DnnSuperResImpl.html#a11b32bf3c6d7e162d0d8e8f5bb1544cc">setPreferableBackend</a> (int backendId)</td></tr>
<tr class="memdesc:a11b32bf3c6d7e162d0d8e8f5bb1544cc"><td class="mdescLeft"> </td><td class="mdescRight">Set computation backend.  <a href="#a11b32bf3c6d7e162d0d8e8f5bb1544cc">More...</a><br/></td></tr>
<tr class="separator:a11b32bf3c6d7e162d0d8e8f5bb1544cc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa320f11cbe5cfaa40392870fcd6a752c"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d11/classcv_1_1dnn__superres_1_1DnnSuperResImpl.html#aa320f11cbe5cfaa40392870fcd6a752c">setPreferableTarget</a> (int targetId)</td></tr>
<tr class="memdesc:aa320f11cbe5cfaa40392870fcd6a752c"><td class="mdescLeft"> </td><td class="mdescRight">Set computation target.  <a href="#aa320f11cbe5cfaa40392870fcd6a752c">More...</a><br/></td></tr>
<tr class="separator:aa320f11cbe5cfaa40392870fcd6a752c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3d8bf9e39c75939ab8d2de8396201a89"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d11/classcv_1_1dnn__superres_1_1DnnSuperResImpl.html#a3d8bf9e39c75939ab8d2de8396201a89">upsample</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> img, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> result)</td></tr>
<tr class="memdesc:a3d8bf9e39c75939ab8d2de8396201a89"><td class="mdescLeft"> </td><td class="mdescRight">Upsample via neural network.  <a href="#a3d8bf9e39c75939ab8d2de8396201a89">More...</a><br/></td></tr>
<tr class="separator:a3d8bf9e39c75939ab8d2de8396201a89"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0834ecb99e6dfcef340ec34e41aa2c09"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d11/classcv_1_1dnn__superres_1_1DnnSuperResImpl.html#a0834ecb99e6dfcef340ec34e41aa2c09">upsampleMultioutput</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> img, std::vector&lt; <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &gt; &amp;imgs_new, const std::vector&lt; int &gt; &amp;scale_factors, const std::vector&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &gt; &amp;node_names)</td></tr>
<tr class="memdesc:a0834ecb99e6dfcef340ec34e41aa2c09"><td class="mdescLeft"> </td><td class="mdescRight">Upsample via neural network of multiple outputs.  <a href="#a0834ecb99e6dfcef340ec34e41aa2c09">More...</a><br/></td></tr>
<tr class="separator:a0834ecb99e6dfcef340ec34e41aa2c09"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a71cc8bc5a48a19584b99942a67dc8bc7"><td align="right" class="memItemLeft" valign="top">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../d8/d11/classcv_1_1dnn__superres_1_1DnnSuperResImpl.html">DnnSuperResImpl</a> &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d11/classcv_1_1dnn__superres_1_1DnnSuperResImpl.html#a71cc8bc5a48a19584b99942a67dc8bc7">create</a> ()</td></tr>
<tr class="memdesc:a71cc8bc5a48a19584b99942a67dc8bc7"><td class="mdescLeft"> </td><td class="mdescRight">Empty constructor for python.  <a href="#a71cc8bc5a48a19584b99942a67dc8bc7">More...</a><br/></td></tr>
<tr class="separator:a71cc8bc5a48a19584b99942a67dc8bc7"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A class to upscale images via convolutional neural networks. The following four models are implemented: </p>
<ul>
<li>edsr</li>
<li>espcn</li>
<li>fsrcnn</li>
<li>lapsrn </li>
</ul>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a5a9a8d189caa273fc210441f0858a8a3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5a9a8d189caa273fc210441f0858a8a3">◆ </a></span>DnnSuperResImpl() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::dnn_superres::DnnSuperResImpl::DnnSuperResImpl </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Empty constructor. </p>
</div>
</div>
<a id="a4f6e7d88778f73bcfdf43c0d9bff2c1a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4f6e7d88778f73bcfdf43c0d9bff2c1a">◆ </a></span>DnnSuperResImpl() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::dnn_superres::DnnSuperResImpl::DnnSuperResImpl </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>algo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>scale</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructor which immediately sets the desired model. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">algo</td><td>String containing one of the desired models:<ul>
<li><b>edsr</b></li>
<li><b>espcn</b></li>
<li><b>fsrcnn</b></li>
<li><b>lapsrn</b> </li>
</ul>
</td></tr>
    <tr><td class="paramname">scale</td><td>Integer specifying the upscale factor </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a71cc8bc5a48a19584b99942a67dc8bc7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a71cc8bc5a48a19584b99942a67dc8bc7">◆ </a></span>create()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt;<a class="el" href="../../d8/d11/classcv_1_1dnn__superres_1_1DnnSuperResImpl.html">DnnSuperResImpl</a>&gt; cv::dnn_superres::DnnSuperResImpl::create </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn_superres.DnnSuperResImpl_create(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Empty constructor for python. </p>
</div>
</div>
<a id="af345f7283533961302b854ccc5266f57"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af345f7283533961302b854ccc5266f57">◆ </a></span>getAlgorithm()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> cv::dnn_superres::DnnSuperResImpl::getAlgorithm </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn_superres_DnnSuperResImpl.getAlgorithm(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Returns the scale factor of the model: </p>
<dl class="section return"><dt>Returns</dt><dd>Current algorithm. </dd></dl>
</div>
</div>
<a id="a03ddb65b1a6ae8b0064b91ffe7785eeb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a03ddb65b1a6ae8b0064b91ffe7785eeb">◆ </a></span>getScale()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int cv::dnn_superres::DnnSuperResImpl::getScale </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn_superres_DnnSuperResImpl.getScale(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Returns the scale factor of the model: </p>
<dl class="section return"><dt>Returns</dt><dd>Current scale factor. </dd></dl>
</div>
</div>
<a id="af56741a70ee1346efcc69789f99200d8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af56741a70ee1346efcc69789f99200d8">◆ </a></span>readModel() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::dnn_superres::DnnSuperResImpl::readModel </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>path</em></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.dnn_superres_DnnSuperResImpl.readModel(</td><td class="paramname">path</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Read the model from the given path. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>Path to the model file. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="a1d062da8e770781eb7323a44a25b6fa3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1d062da8e770781eb7323a44a25b6fa3">◆ </a></span>readModel() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::dnn_superres::DnnSuperResImpl::readModel </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>weights</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>definition</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.dnn_superres_DnnSuperResImpl.readModel(</td><td class="paramname">path</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Read the model from the given path. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">weights</td><td>Path to the model weights file. </td></tr>
    <tr><td class="paramname">definition</td><td>Path to the model definition file. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ab4d5e45240e7dbc436f077d34bff8854"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab4d5e45240e7dbc436f077d34bff8854">◆ </a></span>setModel()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::dnn_superres::DnnSuperResImpl::setModel </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>algo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>scale</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.dnn_superres_DnnSuperResImpl.setModel(</td><td class="paramname">algo, scale</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Set desired model. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">algo</td><td>String containing one of the desired models:<ul>
<li><b>edsr</b></li>
<li><b>espcn</b></li>
<li><b>fsrcnn</b></li>
<li><b>lapsrn</b> </li>
</ul>
</td></tr>
    <tr><td class="paramname">scale</td><td>Integer specifying the upscale factor </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="a11b32bf3c6d7e162d0d8e8f5bb1544cc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a11b32bf3c6d7e162d0d8e8f5bb1544cc">◆ </a></span>setPreferableBackend()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::dnn_superres::DnnSuperResImpl::setPreferableBackend </td>
          <td>(</td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>backendId</em></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.dnn_superres_DnnSuperResImpl.setPreferableBackend(</td><td class="paramname">backendId</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Set computation backend. </p>
</div>
</div>
<a id="aa320f11cbe5cfaa40392870fcd6a752c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa320f11cbe5cfaa40392870fcd6a752c">◆ </a></span>setPreferableTarget()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::dnn_superres::DnnSuperResImpl::setPreferableTarget </td>
          <td>(</td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>targetId</em></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.dnn_superres_DnnSuperResImpl.setPreferableTarget(</td><td class="paramname">targetId</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Set computation target. </p>
</div>
</div>
<a id="a3d8bf9e39c75939ab8d2de8396201a89"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3d8bf9e39c75939ab8d2de8396201a89">◆ </a></span>upsample()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::dnn_superres::DnnSuperResImpl::upsample </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>result</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>result</td><td>=</td><td>cv.dnn_superres_DnnSuperResImpl.upsample(</td><td class="paramname">img[, result]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Upsample via neural network. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>Image to upscale </td></tr>
    <tr><td class="paramname">result</td><td>Destination upscaled image </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="a0834ecb99e6dfcef340ec34e41aa2c09"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0834ecb99e6dfcef340ec34e41aa2c09">◆ </a></span>upsampleMultioutput()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::dnn_superres::DnnSuperResImpl::upsampleMultioutput </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &gt; &amp; </td>
          <td class="paramname"><em>imgs_new</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; int &gt; &amp; </td>
          <td class="paramname"><em>scale_factors</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &gt; &amp; </td>
          <td class="paramname"><em>node_names</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.dnn_superres_DnnSuperResImpl.upsampleMultioutput(</td><td class="paramname">img, imgs_new, scale_factors, node_names</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Upsample via neural network of multiple outputs. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>Image to upscale </td></tr>
    <tr><td class="paramname">imgs_new</td><td>Destination upscaled images </td></tr>
    <tr><td class="paramname">scale_factors</td><td>Scaling factors of the output nodes </td></tr>
    <tr><td class="paramname">node_names</td><td>Names of the output nodes in the neural network </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>opencv2/<a class="el" href="../../d3/db0/dnn__superres_8hpp.html">dnn_superres.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:47 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
